config: move pio json handling to statefiles.c
The prefix information files are also examples of statefiles, and there
are some things which can be shared between e.g. the state file logic
and the pio file logic (like the conversion from MONOTIME to time_t and
back, and also the use of tmp files). That's for later patches though,
this just moves the code without any code changes to make subsequent
patches clearer.
Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/333
Signed-off-by: Álvaro Fernández Rojas <[email protected]>